// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 删除权益
 */
export function delQuanyi(id) {
  return request({
    url: '/admin/system/user/levelDiscount/delete/' + id,
    method: 'POST',
  })
}

/**
 * 获取权益
 */
export function getQuanyiList(params) {
  return request({
    url: '/admin/system/user/levelDiscount/list',
    method: 'get',
    params
  })
}

/**
 * 新增权益
 */
export function addQuanyi(data) {
  return request({
    url: '/admin/system/user/levelDiscount/save',
    method: 'post',
    data,
  })
}

/**
 * 更新权益
 */
export function updateQuanyi(data,id) {
  return request({
    url: '/admin/ystem/user/levelDiscount/update/' + id,
    method: 'post',
    data,
  })
}

